package com.itheima.health.job.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

//@Component
@Slf4j
public class TestTask {
    //定时任务表达式,每隔5s执行一次
    @Scheduled(cron = "0/5 * * * * ?")
    public void case01() {
        LocalDateTime now = LocalDateTime.now();
        System.out.println(now + "定时任务执行......");
    }
}
